package com.hanter.demo.raddemo.test;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 类名：ImageInfo <br/>
 * 描述：上传图片信息
 * 创建时间：2020/03/27 10:45
 *
 * @author panxi
 * @version 1.0
 */
public class ImageInfo implements Parcelable {

    private int w;
    private int h;
    private String img;

    public ImageInfo() {
    }

    public ImageInfo(int w, int h, String img) {
        this.w = w;
        this.h = h;
        this.img = img;
    }

    public int getW() {
        return w;
    }

    public void setW(int w) {
        this.w = w;
    }

    public int getH() {
        return h;
    }

    public void setH(int h) {
        this.h = h;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.w);
        dest.writeInt(this.h);
        dest.writeString(this.img);
    }

    protected ImageInfo(Parcel in) {
        this.w = in.readInt();
        this.h = in.readInt();
        this.img = in.readString();
    }

    public static final Creator<ImageInfo> CREATOR = new Creator<ImageInfo>() {
        @Override
        public ImageInfo createFromParcel(Parcel source) {
            return new ImageInfo(source);
        }

        @Override
        public ImageInfo[] newArray(int size) {
            return new ImageInfo[size];
        }
    };
}
